import Home from '../page/Home'
import Detail from '../page/Detail'
import Login from '../page/Login'
import NotMatch from '../page/NotMatch'

import List from '../page/Home/List'
import Car from '../page/Home/Car'
import My from '../page/Home/My'

const routes = [{
  path: '/home',
  name: 'home',
  component: Home,
  auth: true,
  children: [{
    path: '/home/list',
    name: 'list',
    component: List
  },{
    path: '/home/car',
    name: 'car',
    component: Car
  },{
    path: '/home/my',
    name: 'my',
    component: My
  },{
    from: '/home',
    to: '/home/list'
  }]
},{
  path: '/detail',
  name: 'detail',
  component: Detail,
  auth: true,
},{
  path: '/login',
  name: 'login',
  component: Login,
  alreadyLogin: true
}, {
  from: '/',
  to: '/home'
},{
  name: '404',
  component: NotMatch,
}]


export default routes